package cmo.lby.rabbitmq;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
/**
 * 测试时候，不同进程，消费不同的queue, 这些不同的queue，绑定的是同一个exchange
 * @author Administrator
 *
 */
public class FanoutReceiver {

//	private static final Logger logger = LoggerFactory.getLogger("Receiver1");
	
	@RabbitListener(queues="fanout.A")
    public void processA(String str1) {
        System.out.println("ReceiveA:"+str1);
    }
    @RabbitListener(queues="fanout.B")
    public void processB(String str) {
        System.out.println("ReceiveB:"+str);
    }
    @RabbitListener(queues="fanout.C")
    public void processC(String str) {
        System.out.println("ReceiveC:"+str);
    }
}
